home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / oldwish / wish.man < prev    next >
Text File  |  1989-01-19  |  10KB  |  222 lines

  1. ' Copyright 1989 Regents of the University of California
  2. ' Permission to use, copy, modify, and distribute this
  3. ' documentation for any purpose and without fee is hereby
  4. ' granted, provided that this notice appears in all copies.
  5. ' The University of California makes no representations about
  6. ' the suitability of this material for any purpose.  It is
  7. ' provided "as is" without express or implied warranty.
  8. ' $Header: /a/newcmds/wish/RCS/wish.man,v 1.2 89/01/19 16:44:25 mgbaker Exp Locker: mgbaker $ SPRITE (Berkeley)
  9. .so \*(]ltmac.sprite
  10. .HS WISH cmds
  11. .BS
  12. .SH NAME
  13. wish \- Window shell and directory browser for X windows
  14. .SH SYNOPSIS
  15. .nf
  16. \fBwish\fR [\fIoptions\fR] [\fIdirectory\fR]
  17. .SH OPTIONS
  18. .IP "\fB\-nopick\fR" 14
  19. Configure \fBwish\fR so that it will not automatically pick an initial window
  20. size.  Due to X11 changes, this option is temporarily misbehaving.
  21. .IP "\fB\-resize\fR" 14
  22. Configure \fBwish\fR so that it will automatically resize a window whenever it
  23. thinks the window's contents have changed in such a way that another
  24. size would be better.  Due to X11 changes, this option is temporarily
  25. misbehaving.
  26. .IP "\fB\-empty\fR" 14
  27. Display headers for file groups that don't match any files.  The default
  28. is to display headers for file groups that contain files.
  29. .IP "\fB\-debug\fR" 14
  30. Print debug messages and do not fork into the background.  This option is
  31. primarily useful for debugging \fBwish\fR.
  32. .BE
  33. .SH DESCRIPTION
  34. .PP
  35. \fBWish\fR is a command shell and directory browser that uses the facilities
  36. of the X window system, the Sx supplementary library, and the Tcl command
  37. interpreter.  It displays a window containing a configurable list of files
  38. in the directory
  39. specified on the command line, or the directory in which it is started,
  40. if the user does not specify a command-line directory.  Because \fBwish\fR uses
  41. the Sx and Tcl facilities, its selection and other capabilities are
  42. compatible with the \fBmx\fR editor and the \fBtx\fR terminal emulator.
  43. .LP
  44. Commands are invoked through menus and key and mouse button bindings.  All
  45. three of these methods are configurable by the user, because all three of
  46. these methods actually invoke the commands through the Tcl command interpreter.
  47. .LP
  48. \fBWish\fR groups files on its display according to rules provided by the
  49. user.  These rules can include pattern-matching on the file names and various
  50. other properties, including arbitrary rules that the user can specify through
  51. Tcl procedures.  The default list of files contains all the files in the
  52. directory. (Another way of saying this is that the default matching rule
  53. is the pattern \fB*\fR.)  The user can choose attributes he wants displayed
  54. for the files, such as access times and sizes, and he can sort the files
  55. according to different attributes as well.
  56. .LP
  57. \fBWish\fR also provides user-configurable command binding that includes
  58. keyboard bindings, mouse-button bindings and also per-file-group bindings.  The
  59. latter makes it possible, for instance, to use the left mouse button to invoke
  60. a compiler by clicking on \fB*.c\fR files, but a text formatter when clicking
  61. on \fB*.tex\fR files.
  62. .LP
  63. The following sections of this manual page describe the configuration, options,
  64. and possible commands for \fBwish\fR.
  65. .LP
  66.  
  67. .SH  CONFIGURATION OPTIONS AND STARTUP COMMANDS
  68. .PP
  69. Currently most options are specified via a \fB.Xdefaults\fR file and
  70. a \fB.wish\fR file.  More command-line support will be added eventually.
  71. The following list gives the options that can be set in a
  72. user's \fB.Xdefaults\fR file, which is the general X-application startup
  73. file.  The
  74. second section describes options configurable from a wish-specific startup
  75. file, \fB.wish\fR.  \fBWish\fR will startup pleasantly even if one or both
  76. of these files are missing, but it will choose its own default configuration
  77. in this case.
  78. .SH 2 X DEFAULT OPTIONS
  79. .IP "\fBBackground\fR" 16
  80. General background color for \fBwish\fR window.
  81. .IP "\fBForeground\fR" 16
  82. General foreground color for \fBwish\fR window.
  83. .IP "\fBBorder\fR" 16
  84. Color for border of \fBwish\fR window.
  85. .IP "\fBBorderWidth\fR" 16
  86. Width of border around \fBwish\fR window.
  87. .IP "\fBSelection\fR" 16
  88. Color of selection highlighting.
  89. .IP "\fBTitleBackground\fR" 16
  90. Background color of title bar.
  91. .IP "\fBTitleForeground\fR" 16
  92. Foreground color of title bar.
  93. .IP "\fBTitleBorder\fR" 16
  94. Color of border around title bar.
  95. .IP "\fBTxBackground\fR" 16
  96. Background color of attached tx window.
  97. .IP "\fBTxForeground\fR" 16
  98. Foreground color of attached tx window.
  99. .IP "\fBTxBorder\fR" 16
  100. Border color for attached tx window.
  101. .IP "\fBMenuBackground\fR" 16
  102. Background color for menu bar.
  103. .IP "\fBMenuForeground\fR" 16
  104. Foreground color for menu bar.
  105. .IP "\fBSortBackground\fR" 16
  106. Background color for bar specifying current file-sorting method.
  107. .IP "\fBSortForeground\fR" 16
  108. Foreground color for bar specifying current file-sorting method.
  109. .IP "\fBFieldsBackground\fR" 16
  110. Background color for bar specifying displayed file attributes.
  111. .IP "\fBFieldsForeground\fR" 16
  112. Foreground color for bar specifying displayed file attributes.
  113. .IP "\fBEntryBackground\fR" 16
  114. Background color for bar allowing command entry.
  115. .IP "\fBEntryForeground\fR" 16
  116. Foreground color for bar allowing command entry.
  117. .IP "\fBScrollBackground\fR" 16
  118. Background color for scroll bar.
  119. .IP "\fBScrollForeground\fR" 16
  120. Foreground color for scroll bar.
  121. .IP "\fBScrollElevator\fR" 16
  122. Color for elevator in scroll bar.
  123. .IP "\fBGeometry\fR" 16
  124. Window geometry.
  125. .IP "\fBFont\fR" 16
  126. Font to use in \fBwish\fR window.
  127. .IP "\fBTitleFont\fR" 16
  128. Font to use in title bar.
  129. .SH 2 WISH STARTUP OPTIONS
  130. .PP
  131. The \fBwish\fR startup file, \fB.wish\fR, is used for configuring the behavior
  132. of \fBwish\fR initially, and for changing its behavior if the user changes
  133. direcotories.  Thus, each directory may have a different \fB.wish\fR file, if
  134. this is useful.
  135. .IP "\fB selection binding\fR" 20
  136. The Tcl command
  137. .br
  138. \fBvar selectionButton \fIbutton\fR
  139. .br
  140. will set \fIbutton\fR
  141. (left, right, {shift right}, etc) to be the mouse
  142. button used for selecting files and text in a \fBwish\fR window.
  143. .IP "\fBfile sorting\fR" 20
  144. The Tcl command \fBsortFiles \fImethod\fR will configure \fBwish so that
  145. inside a file group, it sorts the files by \fImethod\fR.  The default method
  146. is \fBalpha\fR for alphabetical sorting, but files may also be sorted by
  147. access times, data-modification times, size etc.  They may also be sorted
  148. in reverse order for any method.
  149. .IP "\fBdisplay fields\fR" 20
  150. The Tcl command \fBsetFields \fIfieldname\fR will add the field \fIfieldname\fR
  151. to the file attributes \fBwish\fR is currently displaying.  The default
  152. field is \fBname\fR, but other fields are \fBaccessTime\fR, \fBsize\fR, etc.
  153. \fBWish\fR will try to interpret many types of capitalizations and
  154. abbreviations for each field name.
  155. .IP "\fBdefining groups\fR" 20
  156. The Tcl command \fBdefineGroup\fR is used to define a list of files to
  157. group together on the display.  The command has two options:
  158. \fBdefineGroup comparison \fIpattern\fR create a group that chooses files
  159. using the matching rule \fIpattern\fR on file names.  For example, the command
  160. .sp
  161. \fBdefineGroup comparison B*.ms\fR
  162. .sp
  163. will create a group containing all files starting with the letter `B' and
  164. ending with the suffix `.ms'.  The other option, for arbitrary matching
  165. rules, is
  166. .br
  167. \fBdefineGroup proc \fITcl procedure\fR,
  168. .br
  169. where the given
  170. \fITcl procedure\fR must have a name, which will be the name displayed in the
  171. file group header, and parameter which takes the name of a file to test
  172. against the rule.  The rule is in the Tcl procedure body, and it must
  173. return 1 if the file matches, 0 if not, and a value less than 0 if an error
  174. occurs.  For example, the following defineGroup command will choose all
  175. files beginning with a `.', but excluding the files `.' and `..'.
  176. .sp
  177. \fBdefineGroup proc {proc DotFiles filename {
  178. .br
  179.     return [pattern {!(.) && !(..) && (.*)} $filename]
  180. .br
  181. }}\fR
  182. .sp
  183. The procedure \fBpattern\fR can be called to do arbitrary filename matching.
  184. .IP "\fBper-group command bindings\fR" 14
  185. The command \fBgroupBind \fIgroupName binding command\fR is used to bind
  186. a command, \fIcommand\fR, to a mouse binding, \fIbinding\fR,
  187. for files in a particular group, \fIgroupName\fR.  Following the usual
  188. Tcl syntax, if the command or the binding use more than one word, they
  189. must be enclosed in braces.  For instance, the following will bind the mouse
  190. button \fBshift middle\fR to execute the shell command \fBcc -g -c filename\fR,
  191. on files in the group with suffix `.c'.  The Tcl variable \fB$pointed\fR holds
  192. the name of the file pointed to with the command binding.
  193. .sp
  194. \fBgroupBind *.c {shift middle} {exec cc -g -c $pointed}\fR
  195. .sp
  196. The command \fBexec\fR is used to escape to the user's outside shell (C-shell,
  197. etc), but commands internal to \fBwish\fR can be specified directly.
  198. .IP "\fBkeyboard bindings\fR" 14
  199. Key bindings that aren't specific to particular file groups are specified
  200. with the same mechanism that \fBmx\fR and \fBtx\fR.  See their documentation
  201. for details.
  202. .IP "\fBmenu creation\fR" 14
  203. Menus are created using the same mechanism that \fBmx\fR and \fBtx\fR use.
  204. See their documentation for details.
  205.  
  206. .SH OTHER COMMANDS
  207. .PP
  208. Other commands can be found on the default set of menus.  These include
  209. commands to change directories, open new \fBwish\fR windows in other
  210. directories, etc.
  211. .LP
  212. Some commands can be invoked by using the mouse or by typing in particular
  213. places.  For instance, to change directories, the user need not use the
  214. \fBchangeDirectory\fR command from a menu or from his key bindings.  He can
  215. instead type the new directory name into the title bar that displays the
  216. current directory.  Similarly, typing in the bars that display the
  217. name of a group will change the pattern used for matching files for that group.
  218. .SH KEYWORDS
  219. command shell, X windows, directory browser
  220.